package com.dkm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dkm.entity.MessagePojo;

public interface MessagePojoMapper {

	/**
	 * 根据发送人和接收人获取最新的10条消息
	 * @param sender_id 发送人id
	 * @param receiver_id 接收人id
	 * @return
	 */
	List<MessagePojo> getMessagesBySender_idAndReceiver_id(@Param("sender_id")String sender_id,@Param("receiver_id")String receiver_id);
	/**
	 * 添加消息
	 * @param message
	 * @return
	 */
	Integer addMessage(MessagePojo message);
	
	/**
	 * 根据消息id获取消息信息
	 * @param mid
	 * @return
	 */
	MessagePojo getMessageByMid(@Param("mid")Integer mid);
}
